<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="app" uri="/application" %>
<%@ taglib  prefix="s"  uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="/css/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="all_main">
  <div class="head_main">
    <div class="main_nav">广告列表</div>
    <div class="main_soso">
    <form action="/ad/search_campaign.shtml">
    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
		    <td width="19" height="30" align="center"><img src="../images/clean_011.gif" width="16" height="16" /></td>
		    <td>
		       广告名称：
		      <input name="campaign.adName" type="text" value="${campaign.adName}" style="width:80px;" class="inputwidth01" id="art.realName" maxlength="30" />&nbsp;&nbsp;
		  <!-- 
		  广告类型：<select name="campaign.adCate">
			           <option value="">请选择...</option>
			           <app:cons_select code="004" value="${campaign.adCate}"></app:cons_select>
			        </select>  
		   -->   
		       广告状态:
		       <select name="campaign.status">
		          <option value="">请选择...</option>
		          <app:statusSelect value="${campaign.status}" type="adCampaign"></app:statusSelect>
		       </select> 
		       显示类型:
		       
		       <select name="viewType">
		          <option value="">请选择...</option>
		          <option value="p"  <c:if test="${viewType=='p'}">selected="selected"</c:if>>notification push</option>
		          <option value="w"  <c:if test="${viewType=='w'}">selected="selected"</c:if>>ad wall</option>
		          <option value="b"  <c:if test="${viewType=='b'}">selected="selected"</c:if>>bannel</option>
		          <option value="f"  <c:if test="${viewType=='f'}">selected="selected"</c:if>>全屏</option>
		       </select> 
		      </td>
		    <td align="left">
		      <input name="input7" type="submit" class="input01" value="搜索" /></td>
		  </tr>
		</table>
    </form>
    </div>
    <div class="main_title">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <th width="5%">编号</th>
          <th width="25%">广告名称</th>
          <th width="10%">创建时间</th>
          <!-- <th width="6%">广告类型</th> -->
          
          <th width="7%">计费类型 </th>
          <th width="10%">显示类型 </th>
          <th width="8%">状态</th>
          <!-- <th width="20%">操作</th> -->
          
          <th></th>
        </tr>
      </table>
    </div>
  </div>
  <div class="content_main">
    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="background_hegh01">
      <c:forEach items="${page_list.list}" var="o">
	      <tr>
	         <td width="5%">${o[0].adId}</td>
	         <td width="25%">${o[0].adName} &nbsp;<span style="color:#ff6666;">(<fmt:formatDate value="${o[0].beginDate}" pattern="yyyy-MM-dd"/>--<fmt:formatDate value="${o[0].endDate}" pattern="yyyy-MM-dd"/>)</span></td>
	         <td width="10%"><fmt:formatDate value="${o[0].createDate}" pattern="yyyy-MM-dd"/></td>
	         <!-- <td width="6%"><app:code_name code="${o[0].adCate}"></app:code_name>  </td> -->
	         <td width="7%">
	           <c:choose>
	              <c:when test="${o[0].adType=='1'}">cpc</c:when>
	              <c:when test="${o[0].adType=='0'}">cpm</c:when>
	              <c:otherwise>cpa</c:otherwise>
	           </c:choose>
	         </td>
	         <td width="10%">
	            <c:choose>
	               <c:when test="${o[1].viewType=='p'}">推送广告</c:when>
	               <c:when test="${o[1].viewType=='f'}">全屏</c:when>
	               <c:when test="${o[1].viewType=='w'}">ad wall</c:when>
	               <c:when test="${o[1].viewType=='b'}">bannel</c:when>
	               <c:otherwise>--</c:otherwise>
	            </c:choose>
	         </td>
	         <td width="8%"><app:basestus status="${o[0].status}" type="adcampaign"></app:basestus>  </td>
	         <td width="20%"> 
	            <!-- 0:未完成 1:待审核  2:正常 3:暂停 4:删除 5:未通过 6:结束 7：系统暂停 <a href="/ad/campaign_detail.shtml?id=${o[0].adId}">详情</a> -->
	            &nbsp;
	         </td>
	         <td >&nbsp;</td>
	      </tr>
      </c:forEach>
    </table>
  </div>
  
  <app:page></app:page>
</div>
</body>
</html>
<script type="text/javascript">
  
     function us(id,s){
    	 if(confirm('确定操作?')){
    		 	window.location='/campaign/update_campaign_state.shtml?id='+id+'&state='+s; 
    	 }
     }

</script>